function useAchievement() {
    const [achievement, setAchievement] = React.useState(null);

    React.useEffect(() => {
        const checkAchievement = async () => {
            try {
                const previousAchievement = await checkPreviousAchievement();
                if (previousAchievement) {
                    setAchievement(previousAchievement);
                }
            } catch (error) {
                reportError(error);
            }
        };
        checkAchievement();
    }, []);

    return {
        achievement,
        setAchievement
    };
}
